package com.x.chalk.controller;

import com.x.chalk.service.intf.HotTopicService;
import com.x.chalk.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/api/hotTopic/")
@Api(tags = "热门话题相关操作------未完成")
public class HotTopicController {

    @Autowired
    private HotTopicService hotTopicService;

    @GetMapping("queryAll")
    public R queryAll(){
        return hotTopicService.queryAll();
    }

    //根据评论数量 降序排序
    @GetMapping("queryDesc")
    public R queryDesc(){
        return hotTopicService.queryDesc();
    }



}
